/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Utilities;

namespace VOL.demo.IServices
{
    public partial interface IInventoryService : IService<InventoryModel>
    {
        /// <summary>
        /// 添加库存信息
        /// </summary>
        /// <param name="inventory">库存信息</param>
        /// <returns></returns>
        WebResponseContent AddInventory(InventoryModel inventory);

        /// <summary>
        /// 批量添加库存信息
        /// </summary>
        /// <param name="inventories">库存列表</param>
        /// <returns></returns>
        WebResponseContent BatchAddInventory(List<InventoryModel> inventories);

        /// <summary>
        /// 根据货品ID获取库存信息
        /// </summary>
        /// <param name="goodsId">货品ID</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByGoodsId(long goodsId);

        /// <summary>
        /// 根据仓库ID获取库存信息
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByWarehouse(long warehouseId);

        /// <summary>
        /// 根据货品ID和仓库ID获取库存信息
        /// </summary>
        /// <param name="goodsId">货品ID</param>
        /// <param name="warehouseId">仓库ID</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByGoodsAndWarehouse(long goodsId, long warehouseId);

        /// <summary>
        /// 根据批次号获取库存信息
        /// </summary>
        /// <param name="batchNo">批次号</param>
        /// <returns></returns>
        List<InventoryModel> GetInventoryByBatchNo(string batchNo);

        /// <summary>
        /// 库存调整
        /// </summary>
        /// <param name="inventoryId">库存ID</param>
        /// <param name="adjustQuantity">调整数量（正数为增加，负数为减少）</param>
        /// <param name="reason">调整原因</param>
        /// <returns></returns>
        WebResponseContent AdjustInventory(long inventoryId, int adjustQuantity, string reason);

        /// <summary>
        /// 更新库存信息
        /// </summary>
        /// <param name="inventory">库存信息</param>
        /// <returns></returns>
        WebResponseContent UpdateInventory(InventoryModel inventory);

        /// <summary>
        /// 删除库存信息
        /// </summary>
        /// <param name="id">库存ID</param>
        /// <returns></returns>
        WebResponseContent DeleteInventory(long id);

        /// <summary>
        /// 获取低库存预警信息
        /// </summary>
        /// <returns></returns>
        List<InventoryModel> GetLowStockAlert();

        /// <summary>
        /// 获取即将过期的库存信息
        /// </summary>
        /// <param name="days">提前天数</param>
        /// <returns></returns>
        List<InventoryModel> GetExpiringSoonInventory(int days);

        /// <summary>
        /// 批量设置库存上下限
        /// </summary>
        /// <param name="inventoryIds">库存ID列表</param>
        /// <param name="upperLimit">库存上限</param>
        /// <param name="lowerLimit">库存下限</param>
        /// <returns></returns>
        WebResponseContent BatchSetInventoryLimits(List<long> inventoryIds, int? upperLimit, int? lowerLimit);

        /// <summary>
        /// 获取库存统计信息
        /// </summary>
        /// <param name="warehouseId">仓库ID（可选）</param>
        /// <returns></returns>
        object GetInventoryStatistics(long? warehouseId);
    }
}

